﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using G.Controls;

namespace G.WeiBo.LoacalControls
{
    public class MessageChildControl : BaseMsgControl
    {
        public MessageChildControl()
        {
            this.DefaultStyleKey = typeof(MessageChildControl);
        }

        //ContextMenu contextMenu;
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            TextButton btnNickName = this.GetTemplateChild("btnNickName") as TextButton;
            if (btnNickName != null)
            {
                btnNickName.Click += (s, e) =>
                {
                    G.Navigate.NavigationService.Navigate("/View/UserInfoPage.xaml", this.Message.User);
                };
            }

        }


    }
}
